package com.qf.commerce.controller;

import com.github.pagehelper.PageInfo;
import com.qf.commerce.common.dto.WaybillDto;
import com.qf.commerce.common.vo.WaybillVo;
import com.qf.commerce.resp.ResponseResult;
import com.qf.commerce.service.WaybillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 运单列表
 * 出品人:lsj
 * 1992915043@qq
 */
@RestController
@RequestMapping("/waybill")
public class WaybillController {
     @Autowired
    private WaybillService waybillService;

    /**
     * 运单列表 模糊查询
     * @param waybillDto
     * @param page
     * @param size
     * @return
     */
     @PostMapping("/page")
    public ResponseResult<PageInfo<WaybillVo>>  getPageWaybill( @RequestBody WaybillDto waybillDto,
                                                              @RequestParam(defaultValue = "1") Integer page,
                                                              @RequestParam(defaultValue = "10") Integer size){
        return  ResponseResult.success(waybillService.getPageWaybill(waybillDto,page,size));
    }

}
